<!--详情-立项管理tab结构页-->
<template>
  <div class='tabs-container'>
    <div class='tabs'>
      <div
        v-for='(tab, index) in tabs'
        :key='index'
        :class='{ active: activeTab === index }'
        @click='changeTab(index)'
        class='tabtitle'
      >
        <div class='icon'>
          <a-icon type='tag' theme='filled' :class='{ active: activeTab === index }' />
        </div>
        {{ tab.title }}
        <div class='tiao'></div>
      </div>
    </div>
    <div class='tab-content'>
      <basic-information v-if='activeTab==0'></basic-information>
      <member-information v-if='activeTab==1'></member-information>
      <budget-information v-if='activeTab==2'></budget-information>
      <project-demonstration v-if='activeTab==3'></project-demonstration>
    </div>
  </div>
</template>

<script>
import BasicInformation from '@/views/project/initManage/detail/basicInformation.vue'
import MemberInformation from '@/views/project/initManage/detail/memberInformation.vue'
import BudgetInformation from '@/views/project/initManage/detail/budgetInformation.vue'
import ProjectDemonstration from '@/views/project/initManage/detail/projectDemonstration.vue'

export default {
  name: 'projectManagement',
  components: { ProjectDemonstration, BudgetInformation, MemberInformation, BasicInformation },
  data() {
    return {
      tabs: [
        { title: '基本信息', content: 'Content 1' },
        { title: '成员信息', content: 'Content 2' },
        { title: '预算信息', content: 'Content 3' },
        { title: '项目论证', content: 'Content 4' }
      ],
      activeTab: 0,
      changeTab(index) {
        this.activeTab = index
      }
    }
  }
}
</script>

<style lang='less' scoped>
.tabs-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 660px;
  width: 100%;
  padding: 10px 20px;
  background: #fff;
}

.tabs {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .tabtitle {
    margin-bottom: 40px;
    font-size: 16px;
    width: 120px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #000;
    font-weight: 800;
    position: relative;

    &:nth-child(4) {
      .tiao {
        border-left: 0 dashed #cacaca !important;
      }
    }

    .icon {
      height: 28px;
      width: 28px;
      border-radius: 50%;
      background: #cacaca;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 8px;
    }

    i {
      font-size: 16px;
      color: #a0a0a0;
    }

    .tiao {
      position: absolute;
      top: 30px;
      left: 14px;
      transform: translate(-50%);
      height: 40px;
      width: 3px;
      border-left: 1px dashed #cacaca;
    }
  }
}

.active {
  color: #0a91ff !important;
}

.tab-content {
  flex: 1;
  height: 100%;
  display: flex;

  //justify-content: center;
  border-left: 1px solid #e7e7e7;
  padding-left: 24px;

  .basicinformation {
    min-height: 500px;
    width: 100%;
  }
}
</style>